/* eslint-disable */
'use strict';

module.exports = app => {
    const { STRING, DATE, BIGINT } = app.Sequelize;
    const Categories = app.model.define('categories', {
        id: { type: BIGINT, primaryKey: true, autoIncrement: true },
        label: {
            type: STRING(255),
            allowNull: false,
        },
        created_at: DATE,
        updated_at: DATE,
    }, {
        tableName: 't_categories',
    });

    Categories.associate = function () {
        app.model.Categories.hasMany(app.model.Outfit, {
            foreignKey: 'category_id',
            as: "categories",
        });
    };

    return Categories;
};
